package spring.cloud.pojo;

/**
 * @author cyt
 * @create 2020-03-11 16:59
 */
import java.io.Serializable;

/**
 * 实体类需要实现序列化
 * <p>
 * orm映射
 */
// 链式的写法

/**
 * depart  d1 = new depart();
 * d1.setId().setName().setDb_source();
 * @author Administrator
 */
public class Depart implements Serializable {

    private Integer id;
    private String name;
    // 微服务下， 一个服务对应着一个数据库， 同一个信息可能存在不同的数据库中

    private String db_source;

    public Depart() {
    }

    public Depart(String name) {
        this.name = name;
    }


    @Override
    public String toString() {
        return "depart{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", db_source='" + db_source + '\'' +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDb_source() {
        return db_source;
    }

    public void setDb_source(String db_source) {
        this.db_source = db_source;
    }
}
